﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
    [Table("hrm_mp_exec_positions"), DataContract]
    public class ExecutivePosition
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "ExecPosId", ResourceType = typeof(Resources.ExecutivePositionResource))]
        [Column("exec_pos_seq")]
        public int ExecPosId { get; set; }

        [DataMember, Display(Name = "Code", ResourceType = typeof(Resources.ExecutivePositionResource))]
        [Column("exec_pos_code")]
        public string Code { get; set; }

        [DataMember, Display(Name = "Name", ResourceType = typeof(Resources.ExecutivePositionResource))]
        [Column("exec_pos_name")]
        public string Name { get; set; }

        [DataMember, Display(Name = "NameEng", ResourceType = typeof(Resources.ExecutivePositionResource))]
        [Column("exec_pos_name_eng")]
        public string NameEng { get; set; }

        [DataMember, Display(Name = "NameShort", ResourceType = typeof(Resources.ExecutivePositionResource))]
        [Column("exec_pos_name_short")]
        public string NameShort { get; set; }

        [DataMember]
        [Column("exec_pos_name_eng_short")]
        public string NameEngShort { get; set; }

        [DataType(DataType.MultilineText)]
        [DataMember, Display(Name = "Remarks", ResourceType = typeof(Resources.ExecutivePositionResource))]
        [Column("remarks")]
        public string Remarks { get; set; }

        [ForeignKey("ExecPosGroup")]
        [DataMember]
        [Column("exec_pos_grp_seq")]
        public int? ExecPosGroupId { get; set; }

        [DataMember]
        public virtual SYS.ExecPosGroup ExecPosGroup { get; set; }


        #region
        [EnumDataType(typeof(SYS.RecordStatus.EnumRecordStatus))]
        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.ExecutivePositionResource))]
        [Column("record_status")]
        public string RecordStatus { get; set; }

        [Column("created_by")]
        public int? CreatedBy { get; set; }
        [Column("created_when")]
        public DateTime? CreatedWhen { get; set; }
        [Column("updated_by")]
        public int? UpdatedBy { get; set; }
        [Column("updated_when")]
        public DateTime? UpdatedWhen { get; set; }
        #endregion
    }
}
